const router = require('express').Router()
// 地图搜索
router.get('/get-search-place', async (req, res) => {
    console.log(req);
    const params = req.query
    const resData = await fetch(
        `https://apis.map.qq.com/ws/place/v1/search?keyword=${params.keyword}&boundary=nearby(${params.latitude},${params.longitude},${params.range})&key=OYLBZ-V52WL-ZOZP7-EL2WI-WCKGZ-B5BQG`
    )
    const {data} = await resData.json()
    console.log('数据',data);
    res.send({ flag: true, data, msg: '查询成功' });
})
module.exports = router